<template>
  <div>
      <h1 class="title">{{title}}</h1>
      <hr>
      <div class="content" v-html="goodsobj.content"></div>
  </div>
</template>

<script>
export default {
    data(){
        return {
            id:this.$route.params.id,
            title:this.$route.params.title,
            goodsobj:{}
        }
    },
    methods:{
        //根据商品id查看图文详情
        getDesc(){
            this.$ajax({
                url:"/goodsdesc/"+this.id,
                method:'get'
            }).then(resp=>{
                this.goodsobj = resp.data.message[0];
            });
        }

    },
    created(){
        this.getDesc();

    }

}
</script>

<style scoped>
.title{
    font-size: 13px;
    line-height: 20px;
}
.content >>> img{
    width: 100%;
    height: 100%;
}

</style>